namespace EyeOpen.SampleCms.Web.Runtime.Handlers
{
    using System.Web;
    using System.Web.UI;

    public class PageHandler : IHttpHandlerFactory
    {
        public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated)
        {
            var pagePath = HttpContext.Current.Server.MapPath(ConfigurationWrapper.PagePath);
            return PageParser.GetCompiledPageInstance(context.Request.Path, pagePath, context);
        }

        public void ReleaseHandler(IHttpHandler handler)
        {
        }
    }
}